// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

import BaseUI from "../framwork/BaseUI";
import Pfab_dongfu from "./dongfu/Pfab_dongfu";

const {ccclass, property} = cc._decorator;

@ccclass
export default class Game extends BaseUI {
    private static _instance: Game = null;
    public static getInstance(): Game {
        return Game._instance;
    }
    baseUI_onLoad(): void {
        Game._instance = this;

    }
    baseUI_onDestroy(): void {

    }
    onBtn_click(target: cc.Button, onBtn_name: string): number | void {
        switch (onBtn_name) {
            case "btn_dongfu":
                this.createUI(Pfab_dongfu.prefabUrl,this.GetGameObject("leftView"))
                break;
        }
    }
    init_data(d: any): void {

    }
}
